package edu.nwpu.service.impl;

import edu.nwpu.dao.FoodTypeMapper;
import edu.nwpu.pojo.FoodType;
import edu.nwpu.service.FoodTypeService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("foodTypeService")
public class FoodTypeServiceImpl implements FoodTypeService {

    @Resource
    private FoodTypeMapper foodTypeMapper;

    @Override
    public List<FoodType> getAllFoodTypes() {
        return foodTypeMapper.selectAllFoodTypes();
    }

    // TODO 使用@Transactional重新编写

    @Override
    public boolean deleteFoodTypeById(long id) {
        return false;
    }

    @Override
    public boolean updateFoodType(FoodType newFoodType) {
        return false;
    }

    @Override
    public boolean addFoodType(FoodType foodType) {
        return false;
    }

}
